package com.lin.cloud.disk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lin.cloud.disk.entity.dto.LogicDeleteStatusDTO;
import com.lin.cloud.disk.entity.pojo.Department;
import com.lin.cloud.disk.entity.request.CountTotalSizeRequest;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (Department)表数据库访问层
 *
 * @author ljc
 * @since 2020-12-10 16:45:58
 */
@Repository
public interface DepartmentMapper extends BaseMapper<Department> {


    /**
     * 通过部门ID列表查询部门列表
     * @param departmentIdList
     * @return
     */
    List<Department> selectDepartmentByDepartmentIdList(@Param("departmentIdList") List<Long> departmentIdList);

    /**
     * 删除公司部门
     * @param deleteStatusDTO
     * @return
     */
    Integer logicDeleteOrRecover(LogicDeleteStatusDTO deleteStatusDTO);

    /**
     * 统计部门数量
     * @param request
     * @return
     */
    Integer countDepartmentSize(CountTotalSizeRequest request);
}